﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace XmlDSigEx
{
    class XmlSignatureVerifier
    {
        public void VerifySignature(XmlElement signature, XmlDocument context)
        {
            CheckSignature(signature);
            CheckReferenceDigests(signature, context);
        }

        private void CheckSignature(XmlElement signature)
        {
            XmlElement sigElement = signature.SelectSingleNode("./SignatureValue") as XmlElement;
            if (sigElement == null)
                throw new Exception();

            byte[] signatureValue = Convert.FromBase64String(sigElement.Value);

        }

        private void CheckReferenceDigests(XmlElement signature, XmlDocument context)
        {
            throw new NotImplementedException();
        }
    }
}
